Skip to content

Conversation

chillpixelfun
Copy link
Contributor

@chillpixelfun chillpixelfun commented Aug 27, 2023

What does this PR do?

Resolves #4804 an error sometimes thrown while iterating over state_dict.keys() caused by using the .pop() method within the loop.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Solves an error sometimes thrown while iterating over state_dict.keys() caused by using the .pop() method within the loop.
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@sayakpaul
Copy link
Member

Thanks for your contributions.

@sayakpaul sayakpaul merged commit e8c9069 into huggingface:main Aug 28, 2023
@patrickvonplaten
Copy link
Contributor

Great catch & fix!

@chillpixelfun chillpixelfun deleted the fix-loaders-map_sgm_blocks branch August 28, 2023 13:22
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Update loaders.py

Solves an error sometimes thrown while iterating over state_dict.keys() caused by using the .pop() method within the loop.

* Update loaders.py
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* Update loaders.py

Solves an error sometimes thrown while iterating over state_dict.keys() caused by using the .pop() method within the loop.

* Update loaders.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LoraLoaderMixin | RuntimeError: dictionary changed size during iteration
4 participants